package com.jinyi.wwdeng.ui.wallpaper.view

import android.util.Log
import android.view.View
import com.jinyi.base.mvp.BaseMvpActivity
import com.jinyi.wwdeng.databinding.ActWallpaperBinding
import com.jinyi.wwdeng.pro.ProMvpAct
import com.jinyi.wwdeng.ui.wallpaper.contract.WallPaperContract
import com.jinyi.wwdeng.ui.wallpaper.presenter.WallpaperPresenter

/**
 * JinYiTest
 *
 * @Author：wwdeng
 * @CreateTime：2024/4/14 18:51
 * <pre>
 * 页面
</pre> *
 */
class WallpaperAct : ProMvpAct<WallPaperContract.View, WallpaperPresenter>(), WallPaperContract.View {

    lateinit var binding: ActWallpaperBinding


    override fun getRootView(): View {
        binding = ActWallpaperBinding.inflate(layoutInflater)
        return binding.root
    }

    override fun initView() {
        setTextTitle("墙纸")
        initPresenter()
    }

    override fun initListener() {
        binding.btnBack.setOnClickListener {
            finish()
        }
    }

    override fun initData() {
        presenter.requestData("http://service.picasso.adesk.com/v1/vertical/vertical?limit=30&skip=180&adult=false&first=0&order=hot")
    }

    override fun showSuccessData(data: String) {
        Log.w("TAG",">>>>>>>>data：$data")

    }
    override fun showFailureData(data: String) {


    }
    override fun createPresenter(): WallpaperPresenter {
        return WallpaperPresenter()
    }
}
